require 'psd'
require 'json'
PSD.open('/Users/jonny/code/self-workspace/install-ren-exercise/src/test/resources/弹窗594x790.psd') do |psd|
    # p psd.tree.to_hash.to_json
    puts psd.tree.to_hash.to_json
    psd.tree.descendant_layers[0].image.save_as_png './test1.png'
    # png.save_as_png './test.png'
    # png = psd.image.to_png
    # psd.image.save_as_png './output.png'
  end
